package com.springark.ms.sampleorders.service;

import com.springark.ms.commons.MsApiResponse;
import com.springark.ms.commons.consts.SpringarkContentTypes;
import com.springark.ms.commons.consts.SpringarkRequestHeaders;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author hankchan
 * @since 2019/5/10
 */
@FeignClient("sample-goods")
@Service
public interface GoodsFeignService {

    @GetMapping(value = "/goods/get", produces = SpringarkContentTypes.APPLICATION_JSON)
    @ResponseBody
    MsApiResponse<List<String>> get(@RequestHeader(SpringarkRequestHeaders.REQUEST_ID) String requestId);

}
